<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>支付宝-手机网页-VIP充值</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style type="text/css">
    .layui-form-label {padding: 9px 4px;width: 50px;}
    .layui-input-block { margin-left: 10px;min-height: 36px; padding: 2px 5px;}
    ul{}
    ul li{ padding: 5px 10px;margin-top: 10px; background: rgba(255,255,255,1);border-radius: 4px;border: 1px solid rgba(42,203,144,1);color: #222;}
    ul li.select{border: 1px solid #F40; color: #F40}
    #save{border: 1px solid rgba(42,203,144,1);background: #FFF; color: #333;}
    div.zs{ background-image: url("/images/zs.png");background-repeat: no-repeat;    background-repeat: no-repeat;position: absolute;padding: 1px 5px;font-size: 12px;color: #fff;width: 70px;height: 30px;right: 10%;z-index: 10;margin-top: -40px;}
    </style>
</head>
<body>
<div class="layui-form"  style="padding-top:60px;">
  <div class="layui-form-item layui-form-text">
<!--     <label class="layui-form-label">账号</label> -->
    <div class="layui-input-block">
      <input name="user_name" id="user_name" class="layui-input layui-text" value="${user_name?default('')}" placeholder="51度注册手机 或ID"/>
    </div>
  </div>
  <div class="layui-form-item layui-form-text">
<!--     <label class="layui-form-label">套餐</label> -->
    <div class="layui-input-block">
       <ul>
    		<#list package_list as one>
    		<li package_id="${one.id}">${one.title}<#if one.zs_hot gt 0> <div class="zs">送${one.zs_hot}℃</div></#if> ${one.price}元</li>
    		</#list>
    	</ul>
    </div>
  </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label"></label>
    <div class="layui-input-block">
      <a class="layui-btn layui-btn-norma" id="save" ><img alt="" src="/images/zhifubao.png" style="width: 18px;height: 18px;margin-right: 10px;">立即充值</a>
    </div>
  </div>
</div>
</body>
<script src="/js/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js"></script>
<script type="text/javascript">
$("ul li").click(function(){
	 $('ul li').removeClass('select');  // 删除其他兄弟元素的样式
    $(this).addClass('select'); 
});
$("#save").click(function(){
	if ($("ul li.select").attr("package_id") != undefined){
		var package_id = $("ul li.select").attr("package_id");
		var user_name = $("#user_name").val();
		if(user_name) {
			window.location.href= "/pay/alipay2?package_id=" +package_id+"&user_name="+user_name;	
		} else {
			layer.msg("请输入账号!");
		}
	} else {
		layer.msg("请选择套餐!");
	}
	
});

</script>
</html>